#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

//数据范围太大，被卡住
const int N = 2e5 + 10;
int primes[N], cnt;
bool st[N];

void get_primes(int n)
{
    for(int i = 2; i <= n; i ++)
    {
        if(!st[i]) primes[cnt ++] = i;
        for(int j = 0; primes[j] <= n / i; j ++)
        {
            st[primes[j] * i] = true;
            if(i % primes[j] == 0) break;
        }
    }
}
int main()
{
    int n, m;
    cin >> n >> m;
    get_primes(N);
    n = n - 1;
    m = m - 1;
    for(int i = n, j = 0; i <= m; i ++)
    {
        if(j == 0)
        {
            printf("%d", primes[i]);
        }
        else printf(" %d", primes[i]);
        j ++;
        if(j % 10 == 0)
        {
            puts("");
            j = 0;
        }
    }
    return 0;
}